<?php

namespace Domain\Task;

// Value Object
class TaskStatus {

    private $sStatus;

    public function __construct($taskStatus) {
        if(!$this->isValidStatus($taskStatus)) {
            throw new \Exception('Not a valid status: ' . $taskStatus);
        }

        $this->sStatus = $sStatus;
    }

    public function getCurrentStatus() {
        return $this->sStatus;
    }

    private function isValidStatus($taskStatus) {
        $aStatusEnum = array(
            'Finished',
            'Unfinished'
        );

        return \in_array($taskStatus, $aStatusEnum);
    }

}

?>
